<%@ Page Language="c#" CodeBehind="Default.aspx.cs" AutoEventWireup="True" Inherits="FormsGenerator.WebForm1"
    CodePage="65001" %>

<%@ Register TagPrefix="uc1" TagName="TopBanner" Src="Controls/TopBanner.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>FormsGenerator</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="Styles/Default.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <p>
        <uc1:TopBanner ID="TopBanner" runat="server"></uc1:TopBanner>
        <asp:Label ID="LabelErrorMessage" runat="server" EnableViewState="False" CssClass="ErrorMessage"
            Visible="False"></asp:Label><asp:Label ID="LabelMessage" runat="server" EnableViewState="False"
                CssClass="Message" Visible="False"></asp:Label><asp:Panel ID="ListFormsPanel" runat="server"
                    Width="100%">
                    <table width="100%">
                        <tr>
                            <td>
                                Available forms:
                            </td>
                            <td align="right">
                                <input type="button" id="ButtonNewForm" value="New Form" onclick="window.location='EditForm.aspx'" />
                            </td>
                        </tr>
                    </table>
                    <p>
                        <asp:Label ID="LabelNoForms" runat="server" Visible="False">No forms available</asp:Label>
                        <asp:DataGrid ID="DataGridForms" runat="server" Width="100%" ShowFooter="False" GridLines="Horizontal"
                            CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#000099"
                            AutoGenerateColumns="False" AllowSorting="True">
                            <SelectedItemStyle Font-Bold="True" ForeColor="#F7F7F7" BackColor="#738A9C"></SelectedItemStyle>
                            <AlternatingItemStyle BackColor="#F7F7F7"></AlternatingItemStyle>
                            <ItemStyle ForeColor="#4A3C8C" BackColor="#E6EAFF"></ItemStyle>
                            <HeaderStyle Font-Bold="True" ForeColor="#F7F7F7" BackColor="#000099"></HeaderStyle>
                            <FooterStyle ForeColor="#4A3C8C" BackColor="#CCCCCC"></FooterStyle>
                            <Columns>
                                <asp:BoundColumn DataField="guid" HeaderText="ID"></asp:BoundColumn>
                                <asp:BoundColumn DataField="Name" HeaderText="Name"></asp:BoundColumn>
                                <asp:BoundColumn DataField="CreatedDate" HeaderText="Created" DataFormatString="{0:dd/MM/yyyy}">
                                </asp:BoundColumn>
                                <asp:BoundColumn DataField="Owner" HeaderText="Owner"></asp:BoundColumn>
                                <asp:TemplateColumn HeaderText="Results" Visible="True">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="HyperLinkResults" runat="server" NavigateUrl="javascript:void(0)">[View]</asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="Actions">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButtonEdit" runat="server" Visible="false" Text="Edit" CommandName="Edit"
                                            CausesValidation="false">[Edit]</asp:LinkButton>
                                        <asp:LinkButton ID="LinkButtonDelete" runat="server" Visible="false" Text="Delete"
                                            CommandName="Delete" CausesValidation="false">[Delete]</asp:LinkButton>
                                        <asp:LinkButton ID="LinkbuttonLock" runat="server" Visible="false" Text="Lock" CommandName="Lock"
                                            CausesValidation="false">[Lock]</asp:LinkButton>
                                        <asp:HyperLink ID="HyperLinkAccess" runat="server" Visible="False" NavigateUrl="javascript:void(0)">[Access]</asp:HyperLink>
                                        <asp:LinkButton ID="LinkbuttonUnlock" runat="server" Visible="false" Text="Unlock"
                                            CommandName="Unlock" CausesValidation="false">[Unlock]</asp:LinkButton>
                                        <asp:Label ID="LabelLockedBy" runat="server" Visible="False"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                            <PagerStyle HorizontalAlign="Right" ForeColor="#4A3C8C" BackColor="#E7E7FF" Mode="NumericPages">
                            </PagerStyle>
                        </asp:DataGrid></p>
                </asp:Panel>
        <p>
        </p>
        <p>
            <asp:Panel ID="PanelInstructions" runat="server" CssClass="Instructions" Width="100%">
                <ul>
                    <li>To <b>create</b> a new form, click the "New form" button</li>
                    <li>To <b>edit</b> a form, lock it first. When it's locked, nobody else can edit it.</li>
                    <li>To <b>delete</b> a form, first lock it. </li>
                </ul>
            </asp:Panel>
            <p>
            </p>
            <p>
                <asp:Label ID="LabelDebug" runat="server" EnableViewState="False"></asp:Label></p>
    </form>
</body>
</html>
